# Contributor: Bart Ribbers <bribbers@disroot.org>
# Maintainer: Bart Ribbers <bribbers@disroot.org>
pkgname=kimap
pkgver=20.04.3
pkgrel=0
pkgdesc="Job-based API for interacting with IMAP servers"
arch="all !armhf"
url="https://community.kde.org/KDE_PIM"
license="LGPL-2.0-or-later"
depends_dev="qt5-qtbase-dev cyrus-sasl-dev kcoreaddons-dev ki18n-dev kio-dev kmime-dev"
makedepends="$depends_dev extra-cmake-modules"
source="https://download.kde.org/stable/release-service/$pkgver/src/kimap-$pkgver.tar.xz"
subpackages="$pkgname-dev"

build() {
	cmake -B build \
		-DCMAKE_BUILD_TYPE=None \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_INSTALL_LIBDIR=lib
	cmake --build build
}

check() {
	cd build

	# loginjobtest is broken
	CTEST_OUTPUT_ON_FAILURE=TRUE ctest -E "loginjobtest"
}

package() {
	DESTDIR="$pkgdir" cmake --build build --target install
}
sha512sums="d9bfc2390270eb46b903e54f88e84fbc8dbae0cbf71fe69ad826d77d64978c1512b7c9de617ab64cb449d5c0d6fa386ab60f3da634bdcbce01b924a36a7c10e5  kimap-20.04.3.tar.xz"
